package com.example.idachuappone.person.item;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.example.idachuappone.BaseActivity;
import com.example.idachuappone.R;
import com.example.idachuappone.index.dialog.IDialog;
import com.lidroid.xutils.bitmap.BitmapGlobalConfig.BitmapCacheManagementTask;

public class AboutActivity extends BaseActivity implements OnClickListener {
	private Button btn_back;
	private boolean isvisible;
	private LinearLayout ll_weixin;
	private RelativeLayout rl_phone;
	private RelativeLayout rl_weixin;
	private RelativeLayout rl_xinlang;

	public AboutActivity() {
		this.isvisible = false;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about);
		initView();
	}

	private void initView() {
		this.btn_back = (Button) findViewById(R.id.btn_back);
		this.btn_back.setOnClickListener(this);
		this.rl_phone = (RelativeLayout) findViewById(R.id.rl_phone);
		this.rl_phone.setOnClickListener(this);
		this.rl_weixin = (RelativeLayout) findViewById(R.id.rl_weixin);
		this.rl_weixin.setOnClickListener(this);
		this.rl_xinlang = (RelativeLayout) findViewById(R.id.rl_xinlang);
		this.rl_xinlang.setOnClickListener(this);
		this.ll_weixin = (LinearLayout) findViewById(R.id.ll_weixin);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btn_back /* 2131165198 */:
			finish();
		case R.id.rl_phone /* 2131165200 */:
			new IDialog().showPhone(this).show();
		case R.id.rl_weixin /* 2131165202 */:
			if (this.isvisible) {
				this.ll_weixin.setVisibility(BitmapCacheManagementTask.MESSAGE_CLEAR_MEMORY_BY_KEY);
				this.isvisible = false;
				return;
			}
			this.ll_weixin.setVisibility(0);
			this.isvisible = true;
		case R.id.rl_xinlang /* 2131165205 */:
			Intent intent = new Intent(this, WebViewActivity.class);
			intent.putExtra("title", "\u7231\u5927\u53a8");
			intent.putExtra("url", "http://m.weibo.cn/u/5033640555");
			startActivity(intent);
		default:
		}
	}
}
